Skip to content

Add directional/charging skip toggles to Low, High and Battery alarms#692

Merged
marionbarker merged 2 commits into
devfrom
low-alarm-skip-if-rising
Jul 19, 2026
Merged

Add directional/charging skip toggles to Low, High and Battery alarms#692
marionbarker merged 2 commits into
devfrom
low-alarm-skip-if-rising

Conversation

@bjorkert

@bjorkert bjorkert commented Jul 6, 2026

Copy link
Copy Markdown
Member

Adds three opt-in toggles that keep alarms quiet when the situation is already correcting itself. All are off by default, so existing alarms behave exactly as before.

  • Low BG — skip if rising: stays silent while glucose is climbing, only firing when the latest reading is flat or still falling.
  • High BG — skip if falling: the mirror case — stays silent while glucose is dropping, only firing when the latest reading is flat or still rising.
  • Phone Battery — skip while charging: stays silent while the phone is plugged in, using the uploader's charging status from Nightscout. If the uploader doesn't report charging status, the alert still sounds.

For the BG alarms, direction is judged by the last two readings; the delta isn't configurable. The battery toggle relies on the isCharging flag already present in the Nightscout devicestatus payload rather than guessing from battery-level history.

The low alarm can now stay silent while BG is climbing, firing only
when the latest reading is flat or still falling. Off by default, so
existing alarms are unaffected.
The high alarm can now stay silent while BG is falling (mirror of the
low alarm's skip-if-rising). The phone-battery alarm can stay silent
while the phone is charging, using the uploader's charging status from
Nightscout. Both are off by default.
@bjorkert bjorkert changed the title Add option to skip low BG alarm while rising Add directional/charging skip toggles to Low, High and Battery alarms Jul 6, 2026

@codebymini codebymini left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 LGTM

@marionbarker

Copy link
Copy Markdown
Collaborator

Test

✅ successful test

Battery

Select skip when charging
Trio phone battery at 70%. Set battery alarm at or below 75%, get alarm
Plug in Trio phone. Change level to 90% to make sure battery stays below level
Battery shows 75% and plugged in - no alarm but wait a full 5 minutes to make sure.

Low and High Alarms

For the alarms - set persistent to 0 so they alert right away, set snooze to 0 minutes.
Create a cgm input file that goes up and down with 2 readings for each value.
Set low alarm at 90, high alarm at 180.
Should get only two alarms per event - once when cross threshold, once when flat.
pattern is 100, 100, 80, 80, 81, 82, 200, 200, 199, 198
upload at cadence of 150 sec, use a Trio instance to receive the values and update Nightscout URL

✅ alert at 80
✅ alert at 80
✅ silence at 81 until
✅ alert at 200
✅ alert at 200
✅ silence at 199

@marionbarker marionbarker left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve from code review and test

@marionbarker
marionbarker merged commit d347bfc into dev Jul 19, 2026
1 of 2 checks passed
@marionbarker
marionbarker deleted the low-alarm-skip-if-rising branch July 19, 2026 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants